home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / PInterfaces / Signal.p < prev    next >
Encoding:
Text File  |  1992-01-29  |  1.0 KB  |  62 lines  |  [TEXT/MPS ]

  1.  
  2. {
  3. Created: Friday, August 2, 1991 at 11:40 PM
  4.  Signal.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.     Signal Handling interface.
  8.     This must be compatible with C's <signal.h>
  9.  
  10.   Copyright Apple Computer, Inc. 1986, 1987, 1988, 1991
  11.   All rights reserved
  12. }
  13.  
  14.  
  15. {$IFC UNDEFINED UsingIncludes}
  16. {$SETC UsingIncludes := 0}
  17. {$ENDC}
  18.  
  19. {$IFC NOT UsingIncludes}
  20.  UNIT Signal;
  21.  INTERFACE
  22. {$ENDC}
  23.  
  24. {$IFC UNDEFINED UsingSignal}
  25. {$SETC UsingSignal := 1}
  26.  
  27.  
  28. TYPE
  29.     SignalMap =     INTEGER;
  30.     SignalHandler = ^LONGINT;    { Pointer to function }
  31.  
  32. CONST
  33.     SIG_ERR =       -1;            { Returned by IEsignal on error }
  34.     SIG_IGN =        0;
  35.     SIG_DFL =        1;
  36.     SIG_HOLD =        3;
  37.     SIG_RELEASE =    5;
  38.  
  39.     SIGABRT =        $0001;
  40.     SIGINT =        $0002;        { Currently only SIGINT implemented }
  41.     SIGFPE =        $0004;
  42.     SIGILL =        $0008;
  43.     SIGSEGV =        $0010;
  44.     SIGTERM =        $0020;
  45.  
  46. { Signal Handling Functions }
  47.  
  48. FUNCTION
  49.     IEsignal(sigNum: LONGINT; sigHdlr: UNIV SignalHandler):
  50.     SignalHandler; C;
  51.  
  52. FUNCTION
  53.     IEraise(sigNum: LONGINT):
  54.     LONGINT; C;
  55.  
  56.  
  57. {$ENDC} { UsingSignal }
  58.  
  59. {$IFC NOT UsingIncludes}
  60.  END.
  61. {$ENDC}
  62.